package com.design.pattern.stratogy.duck;

import com.design.pattern.stratogy.Duck;
import com.design.pattern.stratogy.behavior.FlyNoWay;
import com.design.pattern.stratogy.behavior.Squeak;

public class RubberDuck extends Duck {

    public RubberDuck() {
        flyBehavior = new FlyNoWay();
        quackBehavior = new Squeak();
    }

    protected void display() {
        System.out.println("我是一只橡胶鸭子");
    }
}